<template>
	<view>
		<remind-carinfo :dataBean="carInfo"></remind-carinfo>

		<view class="boxContrainer">
			<view class="titlBox">
				<text class="title">GPS信息</text>
			</view>

			<view v-if="detailInfo.deviceNo" class="contentBox">
				<view class="text-line">
					<text class="text-name">gps设备号:</text>
					<text class="text-value">{{detailInfo.deviceNo|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">设备状态:</text>
					<text class="text-value">{{detailInfo.deviceStatus|deviceStatus}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">当前里程:</text>
					<text class="text-value">{{detailInfo.useMileage|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">gps最后上报地址:</text>
					<text class="text-value">{{detailInfo.addrDetail|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">gps最后上报时间:</text>
					<text class="text-value">{{detailInfo.timeReported|filterNull}}</text>
				</view>

			</view>

			<view v-else class="nodata">
				<image src="/car/static/no_qx.png" mode=""></image>
				<text>暂无gps信息</text>
			</view>

		</view>

	</view>
</template>

<script>
	import remindCarinfo from '@/components/remindCarInfo/remind-carinfo.vue';
	import settings from '@/settings.js'
	import {
		apiCarGpsInfo
	} from '@/api/car-api.js'
	export default {
		components: {
			remindCarinfo,
		},
		data() {
			return {
				carInfo: {},
				detailInfo: {},
				imgs1: []
			}
		},
		onLoad(op) {
			this.carInfo = op;
			this.getData();
		},
		methods: {

			getData() {
				apiCarGpsInfo(this.carInfo.id).then(res => {
					this.detailInfo = res.data;
				})
			}

		}
	}
</script>

<style lang="scss" scoped>
	.btn-detail {
		width: 180rpx;
		height: 60rpx;
		border-radius: 50rpx;
		color: white;
		text-align: center;
		background-color: $blue15;
		font-size: 26rpx;
		line-height: 60rpx;
		align-self: flex-end;
		margin: 10rpx 20rpx 10rpx;
	}

	
</style>
